/*
*用途：商品表
*作者：hwq
*创建日期：2019-01-14 16:50
*/
const Sequelize = require('sequelize')
const sequelize = require('./sequelize')

const Attach = require('./attach')

const Goods = sequelize.define('goods',{
  id: { type: Sequelize.INTEGER, allowNull: false, autoIncrement: true, primaryKey: true },
  title: { type: Sequelize.STRING, allowNull: false },
  desc: { type: Sequelize.STRING(500) },
  addtime: { type: Sequelize.DATE },
  count: { type: Sequelize.INTEGER, defaultValue: 100 },
  img: { type: Sequelize.STRING, allowNull: false },
  now: { type: Sequelize.DOUBLE, allowNull: false },
  old: { type: Sequelize.DOUBLE, allowNull: false },
  goodsnum: { type: Sequelize.STRING },
  content: { type: Sequelize.TEXT },
  imgs: { type: Sequelize.STRING(500) }
})

module.exports = Goods